package com.beiding.jsonanalyzer.analyze.query;

import com.beiding.jsonanalyzer.analyze.func.FuncBase;
import com.beiding.jsonanalyzer.analyze.func.FuncFactory;

/**
 * 比较器条件,用于构建子句
 */
public class NotConditionFactory implements FuncFactory<FuncBase<ComparatorResult>> {

    private FuncFactory<? extends FuncBase<ComparatorResult>> funcFactory;

    public NotConditionFactory(FuncFactory<? extends FuncBase<ComparatorResult>> funcFactory) {
        this.funcFactory = funcFactory;
    }

    @Override
    public NotCondition createInstance() {
        return new NotCondition(funcFactory.createInstance());
    }
}
